package com.kedou.sdk.params;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;
import com.kedou.sdk.params.bean.Popup;
import com.kedou.sdk.params.bean.PopupConfig;

import java.util.ArrayList;

/**
 * Created by Administrator on 2017/6/5 0005.
 */

public class QuickRegisterResponseParams extends ResponseParams<QuickRegisterResponseParams.QuickRegisterResponseData> {

    public QuickRegisterResponseParams() {
        super();
    }

    protected QuickRegisterResponseParams(Parcel in) {
        super(in);
    }

    public static class QuickRegisterResponseData implements IShowPayIdcardPopup, IPasswordService, Parcelable {

        private String name;
        private int channel_id;
        private String game_id;
        private String reg_from;
        private String password;
        private long reg_ip;
        private long login_ip;
        private long reg_time;
        private long login_time;
        private int status;
        private String id;
        private Popup phone_popup;
        private Popup info_popup;
        private String ticket;
        private int expires_in;
        /**
         * 是否进行上报
         */
        @SerializedName("is_report")
        private int isReport = 1;

        /**
         * 支付实名认证弹窗配置，1:弹窗 2:不弹窗
         */
        @SerializedName("pay_idcard_popup")
        private int isShowPayIdcardPopup;


        public int getIsReport() {
            return isReport;
        }

        public void setIsReport(int isReport) {
            this.isReport = isReport;
        }

        /**
         * 弹窗配置信息
         */
        @SerializedName("popup_config")
        private ArrayList<PopupConfig> popupConfigs;

        /**
         * 弹窗配置信息
         */
        @SerializedName("popup")
        private PopupConfig popupConfig;

        public PopupConfig getPopupConfig() {
            return popupConfig;
        }

        public void setPopupConfig(PopupConfig popupConfig) {
            this.popupConfig = popupConfig;
        }


        public QuickRegisterResponseData() {
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getChannel_id() {
            return channel_id;
        }

        public void setChannel_id(int channel_id) {
            this.channel_id = channel_id;
        }

        public String getReg_from() {
            return reg_from;
        }

        public void setReg_from(String reg_from) {
            this.reg_from = reg_from;
        }

        @Override
        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        public long getReg_ip() {
            return reg_ip;
        }

        public void setReg_ip(long reg_ip) {
            this.reg_ip = reg_ip;
        }

        public long getLogin_ip() {
            return login_ip;
        }

        public void setLogin_ip(long login_ip) {
            this.login_ip = login_ip;
        }

        public long getReg_time() {
            return reg_time;
        }

        public void setReg_time(long reg_time) {
            this.reg_time = reg_time;
        }

        public long getLogin_time() {
            return login_time;
        }

        public void setLogin_time(long login_time) {
            this.login_time = login_time;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public Popup getPhone_popup() {
            return phone_popup;
        }

        public void setPhone_popup(Popup phone_popup) {
            this.phone_popup = phone_popup;
        }

        public Popup getInfo_popup() {
            return info_popup;
        }

        public void setInfo_popup(Popup info_popup) {
            this.info_popup = info_popup;
        }

        public String getTicket() {
            return ticket;
        }

        public void setTicket(String ticket) {
            this.ticket = ticket;
        }

        public int getExpires_in() {
            return expires_in;
        }

        public void setExpires_in(int expires_in) {
            this.expires_in = expires_in;
        }

        public String getGame_id() {
            return game_id;
        }

        public void setGame_id(String game_id) {
            this.game_id = game_id;
        }

        public ArrayList<PopupConfig> getPopupConfigs() {
            return popupConfigs;
        }

        public void setPopupConfigs(ArrayList<PopupConfig> popupConfigs) {
            this.popupConfigs = popupConfigs;
        }

        public boolean isShowPayIdcardPopup() {
            return isShowPayIdcardPopup == 1;
        }

        public void setIsShowPayIdcardPopup(int isShowPayIdcardPopup) {
            this.isShowPayIdcardPopup = isShowPayIdcardPopup;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.name);
            dest.writeInt(this.channel_id);
            dest.writeString(this.game_id);
            dest.writeString(this.reg_from);
            dest.writeString(this.password);
            dest.writeLong(this.reg_ip);
            dest.writeLong(this.login_ip);
            dest.writeLong(this.reg_time);
            dest.writeLong(this.login_time);
            dest.writeInt(this.status);
            dest.writeString(this.id);
            dest.writeParcelable(this.phone_popup, flags);
            dest.writeParcelable(this.info_popup, flags);
            dest.writeString(this.ticket);
            dest.writeInt(this.expires_in);
            dest.writeInt(this.isShowPayIdcardPopup);
            dest.writeTypedList(this.popupConfigs);
            dest.writeInt(this.isReport);
            dest.writeParcelable(this.popupConfig, flags);
        }

        protected QuickRegisterResponseData(Parcel in) {
            this.name = in.readString();
            this.channel_id = in.readInt();
            this.game_id = in.readString();
            this.reg_from = in.readString();
            this.password = in.readString();
            this.reg_ip = in.readLong();
            this.login_ip = in.readLong();
            this.reg_time = in.readLong();
            this.login_time = in.readLong();
            this.status = in.readInt();
            this.id = in.readString();
            this.phone_popup = in.readParcelable(Popup.class.getClassLoader());
            this.info_popup = in.readParcelable(Popup.class.getClassLoader());
            this.ticket = in.readString();
            this.expires_in = in.readInt();
            this.isShowPayIdcardPopup = in.readInt();
            this.popupConfigs = in.createTypedArrayList(PopupConfig.CREATOR);
            this.isReport = in.readInt();
            this.popupConfig = in.readParcelable(PopupConfig.class.getClassLoader());
        }

        public static final Creator<QuickRegisterResponseData> CREATOR = new Creator<QuickRegisterResponseData>() {
            @Override
            public QuickRegisterResponseData createFromParcel(Parcel source) {
                return new QuickRegisterResponseData(source);
            }

            @Override
            public QuickRegisterResponseData[] newArray(int size) {
                return new QuickRegisterResponseData[size];
            }
        };
    }


}
